package com.shenhaofeng.app.utils.format;

import java.math.BigDecimal;


/**
 * 处理数字的工具
 * Created by Administrator on 2016/8/15.
 */
public class NumberUtil {


    /**
     * 获取指定小数点的数字
     * @param f
     * @param count
     * @return
     */
    public static float getDecimal(float f,int count) {
        BigDecimal b = new BigDecimal(f);
        return b.setScale(count, BigDecimal.ROUND_HALF_UP).floatValue();
    }


}
